package com.qfedu.fmmall.update.controller;

import com.qfedu.fmmall.entity.ProductComments;
import com.qfedu.fmmall.entity.ProductSku;
import com.qfedu.fmmall.update.service.StockUpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : yanBin
 * @date :2022/1/25 15:35
 */
@RestController
@RequestMapping("/stock")
public class StockUpdateController {
    @Autowired
    private StockUpdateService stockUpdateService;

    @PutMapping("/update")
    public int update(@RequestBody List<ProductSku> productSkuList){
        return stockUpdateService.updateList(productSkuList);
    }
}
